<?php
/**
 * Created by PhpStorm.
 * User: yuguozhen
 * Date: 16/7/28
 * Time: 下午2:03
 */
namespace models\Timer\One;

class StatisticsModel extends \models\StatisticsDataResultModel{

    //获取当天的记录id
    public function findOne($name,$now_start,$now_end,$type=1){
        $recordidArr = $this->where('STATISTICS_VARIABLE_NAME','=', $name)
            ->where('STATISTICS_TYPE','=',$type)
            ->where('STATISTICS_DATE','>=',$now_start)
            ->where('STATISTICS_DATE','<=',$now_end)
            ->pluck('ID');

        return $recordidArr;
    }
}
